package com.imooc.miaosha.dao;

import com.imooc.miaosha.pojo.User;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component("userMapper")
public interface UserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
    User getUserByPasswordAndMobile(@Param("password")String password,@Param("mobile")String mobile);
    String getSaltByMobile(@Param("mobile") String mobile);
    List<User>getAllUser();

}